<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
if (!function_exists("aaa_return")) {
    function aaa_return($status, $info) {
        return ['status'=>$status, 'info'=>$info];
    }
}

/**
 * 加密
 */
if (!function_exists('aaa_md5')) {
    function aaa_md5($str) {
        return strtoupper(md5($str));
    }
}

if (!function_exists("aaa_dispatch")) {
    function aaa_dispatch($status,$info, $url="/index/index", $sec=3) {
        if ($status == 0) {
           return view("dispatch", ["message"=>false,"error"=>$info, "waitSecond"=>$sec,"jumpUrl"=>$url]);
        } 
        return view("dispatch", ["message"=>$info,"error"=>false, "waitSecond"=>$sec,"jumpUrl"=>$url]);
        
    }
}
